const express=require('express')  //导入express
const router=express.Router() //创建路由对象
const configData = require('../data/config.js')

router.get('/config', function(req,res){  //挂载获取用户列表的路由
    let response = {};
    switch (req.query.sort) {
        case "DUE_DILIGENCE_REPORT_TEMP":
            response = configData.dueDiligenceReportTemp
            break
        case "DUE_DILIGENCE_DATA_WAREHOUSE":
            response = configData.dueDiligenceDataWarehouse
            break
        case "AI_MODEL":
            response = configData.aiModel
            break
        default:
            break
    }
    res.send(response)
})

module.exports=router //向外导出对象